<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/layout/dialogLayout.xhtml">

 	<ui:param name="param_panelTitle" value="健康申请表>申请表信息维护"/>
 	<ui:param name="param_panelWidth" value="800px"/>
 	<ui:param name="id" value="user"/>
	
    <ui:define name="content">
		<h:form>
			<rg:titlePanel id="questionValue" needButton="true" headerTitle="#{questionValueAction.question.questionName}">
				<rg:fieldSet column="double">
				<c:forEach var="questionValue" items="#{questionValueAction.getQuestionValues()}">
					<c:choose>
						<c:when test="#{questionValue.questionExtend.itemType == 'RADIO'}">
							<rg:field label="#{questionValue.questionExtend.item}">
								<h:selectOneRadio id="#{questionValue.questionExtend.name}" value="#{questionValue.extendValue}">
									<c:forEach var="op" items="#{questionValue.questionExtend.questionExtendFields}">
										<f:selectItem itemLabel="#{op.optionDesc}" itemValue="#{op.optionValue}" />
									</c:forEach>
								</h:selectOneRadio>
							</rg:field>
						</c:when>
						<c:when test="#{questionValue.questionExtend.itemType == 'TEXT'}">
                            <rg:inputText value="#{questionValue.extendValue}"
                                id="#{questionValue.questionExtend.name}"
                                label="#{questionValue.questionExtend.item}" textStyle="width:196px;" />
                        </c:when>
                        <c:when test="#{questionValue.questionExtend.itemType == 'TEXTAREA'}">
                            <rg:inputArea id="#{questionValue.questionExtend.name}" textStyle="width:432px;"
                                singleLine="true" label="#{questionValue.questionExtend.item}" value="#{questionValue.extendValue}" />
                        </c:when>
                        <c:when test="#{questionValue.questionExtend.itemType == 'BIGTEXTAREA'}">
                            <rg:inputArea id="#{questionValue.questionExtend.name}" textStyle="width:432px;"
                                singleLine="true" label="#{questionValue.questionExtend.item}" value="#{questionValue.extendValue}" />
                        </c:when>
					</c:choose>
				</c:forEach>
				</rg:fieldSet>
            	<ui:define name="panelButton">
                <a:commandButton styleClass="button" value="修改" 
                    onclick="UI.instance.showMask()" oncomplete="UI.instance.reRender('reRenderMemberHeathInfo');"
                    actionListener="#{questionValueAction.updateQuestionValues()}" reRender="globalMessage" />
                <input type="button" class="button" value="返回" onclick="javascript:DialogLayout.instance.close();"/>
                </ui:define>
            </rg:titlePanel>
		</h:form>
    </ui:define>
</ui:composition>
